package com.wsx.ones.cloud.feign;
import com.wsx.ones.cloud.product.Product;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * Created by wangshuaixin on 17/5/9.
 */
@FeignClient(name = "eureka-client", fallback = FeignServiceFallback.class)
public interface FeignService {


    @RequestMapping(
            value = "/hellos/remote",
            method = {RequestMethod.GET}
    )
    String remoteWorld(@RequestParam("name") String name);


    @RequestMapping(
            value = "/hellos/save",
            method = {RequestMethod.POST}
    )
    String remoteTestPost(@RequestBody Product product);
}
